package com.levy.contronller.lamdaTest.time;

import java.time.LocalDate;
import java.time.LocalTime;
import java.time.MonthDay;

public class Java8TimeTest {

    public static void main(String[] args) {

        LocalDate nowDate = LocalDate.now();
        System.out.println(nowDate);
        System.out.println(nowDate.getYear()+","+nowDate.getMonthValue()+","+nowDate.getDayOfMonth());

        LocalDate localDate = LocalDate.of(2010, 3, 25);
        System.out.println(localDate);

        MonthDay of1 = MonthDay.of(localDate.getMonth(), localDate.getDayOfMonth());
        MonthDay of2 = MonthDay.from(LocalDate.of(2011, 3, 26));
        System.out.println(of1);
        System.out.println(of2);


        LocalTime nowTime = LocalTime.now();
        System.out.println(nowTime);

        LocalTime time2 = nowTime.plusHours(3).plusMinutes(20);
        System.out.println(time2);
    }
}
